const EalenToken = artifacts.require("EalenToken.sol");

const fromWei = bn => {
    return web3.utils.fromWei(bn, "ether");
};

const toWei = number => {
    return web3.utils.toWei(number.toString(), "ether");
};

module.exports = async function (callback) {
    const token = await EalenToken.deployed();
    let res1 = await token.balanceOf("0x057aCa2e2a1e0B9DF3FA7E0C4bD44E709C3639a9");
    console.log(fromWei(res1));

    await token.transfer("0x54d3D6DAaf038d9f28c95C2Fb90031b7FCD61B0E", toWei(1000), {
        from: "0x057aCa2e2a1e0B9DF3FA7E0C4bD44E709C3639a9"
    })

    let res2 = await token.balanceOf("0x057aCa2e2a1e0B9DF3FA7E0C4bD44E709C3639a9");
    console.log(fromWei(res2));
    callback();
}